<?php

/**
 * Paramètres de la page
 *
 * @package cass
 * @author Mickaël CASTANHEIRO <mickael.castanheiro@gmail.com>
 * @version 1.0
 */

namespace cass;

class Parameters extends Element {
    protected $title; // Titre de la page
    protected $css; // Css de la page
    protected $js; // Javascript de la page
    protected $ariane; // Fil d'ariane de la page
    protected $vars; // Variables de contexte

    /**
     * Constructeur du frontController
     */

    public function __construct() {
        $this->css = array();
        $this->js = array();
        $this->ariane = array();
        $this->vars = array();
    }

    public function merge(Parameters $_parameters) {
        if ( empty($this->title) ) {
            $this->title = $_parameters->getTitle();
        }
        $this->css = array_merge($this->css, $_parameters->getCss());
        $this->js = array_merge($this->js, $_parameters->getJs());
        $this->ariane = array_merge($this->ariane, $_parameters->getAriane());
        $this->vars = array_merge($this->vars, $_parameters->getVars());
    }

}